Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Context quality sorted ascending instead of descending
- Changed sort key from (score, -session_count) to (-score, -session_count) so highest-quality repos appear first, consistent with all other score-based sorts in the file.
Or push these changes by commenting:
@cursor push 2b7c6f9946
Preview (2b7c6f9946)
diff --git a/src/primer/server/services/maturity_service.py b/src/primer/server/services/maturity_service.py
--- a/src/primer/server/services/maturity_service.py
+++ b/src/primer/server/services/maturity_service.py
@@ -1703,7 +1703,7 @@
)
)
project_readiness.sort(key=lambda p: p.ai_readiness_score, reverse=True)
- context_quality.sort(key=lambda row: (row.context_quality_score, -row.session_count))
+ context_quality.sort(key=lambda row: (-row.context_quality_score, -row.session_count))
# Aggregate metrics
avg_leverage = (You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit cd173e5. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Tests
ruff check .ruff format --check .bandit -r src/ -c pyproject.tomlpytest --import-mode=importlib -q(963 passed)pytest --import-mode=importlib tests/test_maturity.py -qfrontend: ./node_modules/.bin/tsc --noEmitfrontend: ./node_modules/.bin/eslint src/pages/maturity.tsx src/components/maturity/context-quality-table.tsx src/components/maturity/__tests__/context-quality-table.test.tsx src/components/maturity/__tests__/maturity-summary.test.tsx src/types/api.tsfrontend: ./node_modules/.bin/vitest run --run src/components/maturity/__tests__/context-quality-table.test.tsx src/components/maturity/__tests__/maturity-summary.test.tsxNote
Medium Risk
Adds new computed analytics and a new
context_qualityfield to the maturity API response, which may affect dashboard consumers and has moderate risk of scoring/aggregation edge cases (null telemetry, repo metadata gaps).Overview
Adds per-repository context quality scoring to maturity analytics, combining guide coverage/freshness, token/cache efficiency, and telemetry sensor coverage into a new
context_qualitydataset (with computed top-gap recommendations).Surfaces this new dataset on the Maturity → Projects tab via a
ContextQualityTableUI (empty state + gap badges), and extends the API schemas/types to includeContextQualityEntryinMaturityAnalyticsResponse.Updates tests (backend maturity analytics + frontend table rendering) and marks the roadmap item as shipped.
Reviewed by Cursor Bugbot for commit 20bf93b. Bugbot is set up for automated code reviews on this repo. Configure here.